{include file='public/meta'}
<title>H-ui.admin v3.0</title>
<meta name="keywords" content="H-ui.admin v3.0,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description" content="H-ui.admin v3.0，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
{include file='public/header'}
{include file='public/menu'}
<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户中心 <span class="c-gray en">&gt;</span> 个人客需<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			<div class="cl pd-5 bg-1 bk-gray mt-20">
			<span><a class="btn btn-success radius" href="{:url('vip_list')}"><i class=" glyphicon glyphicon-user"></i> 暂缓客需</a> <a class="btn btn-primary radius" onclick="member_add('新增客需')" class="ml-5" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加客需</a>	<span class="r">共有数据：<strong>{$count}</strong> 条</span> </div>
			<div class="mt-20">
				<table class="table table-border table-bordered table-hover table-bg table-sort">
					<thead>
						<tr class="text-c">
							<th width="25"><input type="checkbox" name="" value=""></th>
							<th width="">ID</th>
							<th width="">用户名</th>
							<th width="">昵称</th>
							<th width="">手机</th>
							<th width="">区域</th>
							<th width="">状态</th>
							<th width="">操作</th>
						</tr>
					</thead>
					<tbody>
						{foreach name='data' item='v'}
						<tr class="text-c">
							<td><input type="checkbox" value="1" name=""></td>
							<td>{$v.vid}</td>
							<td><u style="cursor:pointer" class="text-primary" onclick="member_show('张三','vip_show.html','10001','360','400')">{$v.vname}</u></td>
							<td>{$v.nickname}</td>
							<td>{$v.tel}</td>
							<td class="">{$v.name}</td>
							<td class="td-status"><span class="label label-success radius">{$v.status}</span></td>
							<td class="td-manage">
								<a title="改需求" href="javascript:;" onclick="zan(this,{$v.vid})" class="ml-5" style="text-decoration:none"><i>改需求</i></a>
								<a title="写跟进" href="javascript:;" onclick="vip_follow('跟進',{$v.vid})" class="ml-5" style="text-decoration:none"><i>跟进</i></a>
								<a title="删除" href="javascript:;" onclick="vip_del(this,{$v.vid})" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
							</td>
						</tr>
						{/foreach}
					</tbody>
				</table>
			</div>
		</article>
	</div>
</section>
</article>
	<footer class="footer">
		<p>感谢jQuery、layer、laypage、Validform、UEditor、My97DatePicker、iconfont、Datatables、WebUploaded、icheck、highcharts、bootstrap-Switch<br> Copyright &copy;2015 H-ui.admin v3.0 All Rights Reserved.<br> 本后台系统由<a href="http://www.h-ui.net/" target="_blank" title="H-ui前端框架">H-ui前端框架</a>提供前端技术支持</p>
	</footer>
</div>
</section>

{include file='public/footer'}
<!--请在下方写此页面业务相关的脚本-->
{load href='/static/lib/My97DatePicker/4.8/WdatePicker.js'}
{load href='/static/lib/datatables/1.10.0/jquery.dataTables.min.js'}
{load href='/static/lib/laypage/1.2/laypage.js'}

<script type="text/javascript">
$(function(){
	

});
/*用户-添加*/
function member_add(title){
	layer.open({
		type: 2,
		area: ['600px', '450px'],
		fix: false, //不固定
		maxmin: true,
		shade:0.4,
		title: title,
		content: '{:url('member_add')}',
		end: function () {
                location.href = "{:url('member_vip')}";
            }
    })
}
/*用户-查看*/
function member_show(title,url,id,w,h){
	layer_show(title,url,w,h);
}

/*用户-编辑*/
function member_edit(title,url,id,w,h){
	layer_show(title,url,w,h);
}
/*密码-修改*/
function change_password(title,url,id,w,h){
	layer_show(title,url,w,h);	
}
/*用户-删除*/
function vip_del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
		var data = 'id='+id;
		$.post('{:url('admin/vip/do_del')}',data,function(res){
			layer.msg(res.msg,{icon:1,time:1500},function(){location.reload();});
		});

	});
}
//改需求
function zan(obj,id){
	$.post('{:url('admin/vip/zan')}','vid='+id,function(res){
		layer.msg('修改成功',{icon:1,time:1500},function(){location.reload();});
	});
}
//寫跟進
function vip_follow(title,id){
	layer.open({
		type: 2,
		area: ['800px', '500px'],
		fix: false, //不固定
		maxmin: true,
		shade:0.4,
		title: title,
		content: '{:url('vip_follow')}?vid='+id,
		end: function () {
                location.href = "{:url('member_vip')}";
            }
    })
}
</script>
</body>
</html>	